{extend name='admin@main'}
{block name="button"}
<button data-modal='{:url("add")}' data-title="添加社团文化" class='layui-btn layui-btn-sm layui-btn-primary'>添加风采</button>
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除风采</button>
{/block}

{block name="content"}
<table class="layui-table" lay-skin="line">
    <caption class="margin-bottom-10 text-left">{include file='course_state/index_search'}</caption>
    {notempty name='list'}
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='list-table-sort-td'>
            <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
        </th>
        <th class='text-center nowrap'>学校</th>
        <th class='text-center nowrap'>社团名称</th>
        <th class='text-center nowrap'>风采图片</th>
        <th class='text-center nowrap'>活动视频</th>
        <th class='text-center nowrap'>审核</th>
        <th class='text-center nowrap'>操作</th>
    </tr>
    </thead>
    {/notempty}
    <tbody>

    {foreach $list as $key=>$vo}
    <tr>
        <td class='list-table-check-td think-checkbox'><input class="list-check-box" value='{$vo.id}' type='checkbox'></td>
        <td class='list-table-sort-td'><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></td>
        <td class='text-center nowrap'>
            <div class="inline-block">{$vo.school.name|default=''}</div>
        </td>
        <td class='text-center nowrap'>
            <div class="inline-block">{$vo.course.name|default=''}</div>
        </td>
        <td class='text-center nowrap'>
            {notempty name="vo.images"}
            <img data-tips-image style="width:60px;height:60px" src="{$vo.image[0]|default=''}" class="margin-right-5 text-top">
            {/notempty}
        </td>
        <td class='text-center nowrap'>
            {notempty name="vo.video"}
            <video width="120" height="60" controls>
                <source src="{$vo.videos[0]|default=''}" type="video/mp4">
                您的浏览器不支持 video 标签。
            </video>
            {/notempty}
        </td>
        <td class="text-center nowrap">
            {if $vo.process==1}
            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="同意" data-action="{:url('process')}" data-update="{$vo.id}" data-field='process' data-value="id#{$vo.id};process#2">同意</a>
            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="拒绝" data-action="{:url('process')}" data-update="{$vo.id}" data-field='process' data-value="id#{$vo.id};process#3">拒绝</a>
            {else /}
                {switch $vo.process}
                    {case 2}同意{/case}
                    {case 3}拒绝{/case}
                {/switch}
            {/if}
        </td>

        <td class="text-center nowrap">
            {if auth($base_route . "edit")}
            <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="编辑" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
            {/if}
            {if auth($base_route . "del")}
            <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
            {/if}
        </td>
    </tr>
    {/foreach}
    </tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
{/block}